<template>
	<view class="content">
		<!-- 这里是状态栏 -->
		<view class="status_bar"></view>
		<HeadLeft :webtext='webtext'></HeadLeft>
		<view class="body">
			<view class="line" v-for="(item,i) in 1" :key="i" @click="navto()">
				<!-- <text>{{item.name}}</text> -->
				<text>在线客服</text>
				<image src="../../static/direct-right1.png" mode="widthFix"></image>
			</view>
		</view>
	</view>
</template>

<script>
	import HeadLeft from '../../components/headLeft.vue'
	export default {
		components:{  
			HeadLeft
		},
		data(){
			return{
				webtext:"客服",
				nameList:[],
				url:''
			};
		},
		onLoad() {
			this.getlist()
		},
		methods: {
			// 客服数据
			getlist(){
				this.$u.api.customer().then(res => {
					this.url = res.url
				})
			},
			// 跳转客服详情
			navto(){
				uni.navigateTo({
					url:"/pages/customer/details?url=" + this.url
				})
			}
		}
	}
</script>

<style scoped>
	.body{
		height: calc(100vh - 88upx - 100upx - var(--status-bar-height));
		overflow-y: auto;
		padding-top: 30upx;
	}
	.body .line{
		height: 86upx;
		background: #31395e;
		padding: 22upx 30upx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.body .line text{
		font-size: 34upx;
		color: #f4f8ff;
	}
	.body .line image{
		width: 34upx;
	}
</style>
